<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" >

	<f:view contentType="text/html">
		
		<h:head>		
			<title><ui:insert name="head"></ui:insert></title>
			
			<meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
			
			<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
			
			<script src="#{request.contextPath}/js/bootstrap.js"></script>

			<link type="text/css" href="#{request.contextPath}/css/bootstrap.css" rel="stylesheet" />
		
			<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/style.css" />
			
			<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/nopf.css" />
				
			<link rel="shortcut icon" href="#{request.contextPath}/images/logo_market.ico" type="image/x-icon"/>				
			<!-- <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon"/> -->
	
			<!-- Para los iconos de los botones etc -->
			<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"/>
		</h:head>

		<h:body>
			<div id="header" class="hidden-xs">
				<div class="container">
					<div id="header-title">
						<h1 class="animated fadeInDown">
							<a href="#{request.contextPath}/index.html">Marketplace <span>G1</span></a>
						</h1>
						<p class="animated fadeInLeft">Prototipo | Marketplace Grupo 1 | Tecnologo en Informatica 2013 </p>
					</div>
					
					<div id="social-header" class="dropdown hidden-xs">
						<a class="social-icon animated fadeInDown animation-delay-1 dropdown-toggle pull-right" data-toggle="dropdown" href="#">					
							<img src="#{request.contextPath}/images/logo_market.png" style="width:22px; height: auto;"></img>
						</a>
													
						<div class="dropdown-menu dropdown-profile animated fadeInUp pull-right">
						<p:outputPanel rendered="#{!loginBean.logueado}" style="display:block;">
							<h:form role="form">
								<h5 class="section-title">Bienvenido | Inicie sesion</h5>
								<div class="form-group">
									<div class="input-group login-input">
										<span class="input-group-addon">
											<i class="fa fa-envelope fa-fw"></i>
										</span>
										<p:inputText styleClass="form-control" type="text" placeholder="eMail" value="#{loginBean.email}" required="true"></p:inputText>
									</div>
									<br/>
									<div class="input-group login-input">
										<span class="input-group-addon">
											<i class="fa fa-lock fa-fw"></i>
										</span>
										<p:password styleClass="form-control" type="password" placeholder="Password" value="#{loginBean.password}" required="true"></p:password>
									</div>
									<p:messages id="messages" styleClass="alert alert-dismissable alert-danger" showDetail="true" autoUpdate="true" closable="true" />
									<br />
									<a href="#{request.contextPath}/clienteRegistro.xhtml" class="btn btn-info pull-left">Registrarse</a>
									<h:commandLink id="loginButton" value="Login" update="messages" actionListener="#{loginBean.login}" styleClass="btn btn-primary pull-right" />									
									
								</div>
							</h:form>
							<a href="#{request.contextPath}/signin"><button class="btn btn-fb btn-block pull-left" type="button" style="padding-top:10px; padding-bottom:10px;"><i class="fa fa-facebook"></i></button></a>
							</p:outputPanel>												
							
							<p:outputPanel rendered="#{loginBean.logueado}" style="display:block;">
								<p:graphicImage value="/Imagenes/Logos/#{loginBean.email}" styleClass="media-object pull-left" width="100" height="100" style="margin: 0 15px 0 15px;"/>
								<h4>Bienvenido!</h4>
								<h:outputLabel value="#{loginBean.email}" style="font-size:11px; color:#333333;"/>
								<h:form>
					         		<h:commandLink id="edit" value="Editar " actionListener="#{clienteBean.buscarCliente(loginBean.email)}"
	             							styleClass="btn btn-primary btn-sm" style="float: rigth; margin:5px;">
	             						<span class="glyphicon glyphicon-user"></span>
	             					</h:commandLink>			             					
					         		<h:commandLink id="logout" value="Salir " actionListener="#{loginBean.logout}"
	             							styleClass="btn btn-danger btn-sm" style="float: rigth; margin:5px;">
	             						<span class="glyphicon glyphicon-log-in"></span>
	             					</h:commandLink>             							
       							</h:form>
   							</p:outputPanel>
						</div>
					
					</div>
				</div>
			</div>

			<div class="navbar navbar-default" role="navigation">
			<div class="container">
				<!-- Brand and toggle get grouped for better mobile display -->
				<a class="navbar-brand hidden-lg hidden-md hidden-sm" href="#"><img src="#{request.contextPath}/images/logo_market.png" style="width: 40px; height: auto;"/></a>
				<div class="navbar-header">					
					<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
				</div>

		
				<!--  /////////////////////////////////////////////////////////////////////////////////////////////////////////  -->
		
			
				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav" id="cat-menu">
						<li>
							<p:outputPanel styleClass="texto-icono-cliente">
								<a href="#{request.contextPath}"><span class="glyphicon glyphicon-home"></span> Inicio </a>
							</p:outputPanel>
						</li>					
						<li class="dropdown">
							<a href="#" class="dropdown-toggle texto-icono-cliente" data-toggle="dropdown">
							<span class="glyphicon glyphicon-list-alt"> </span> Categorias  <b class="caret"></b></a>
							<ul class="dropdown-menu animated fadeInUp grid-categorias" >								
								<h:form id="categorias">
							        <p:dataList value="#{subcategoriaBean.categoriasConSubcategorias}" rows="3"
							        			var="c" style="border:none;" styleClass="grid-sbordes">
								        	
					        			<h4>#{c.nombre}</h4>
					        			
   								        <p:dataList value="#{subcategoriaBean.obtenerSubcategorias(c.nombre)}" rows="3"
   								        			var="sc" style="border:none;" styleClass="grid-sbordes">
											<h:commandLink actionListener="#{versionBean.obtenerContenidosFiltrados('subcategorias', sc.nombre)}" value="#{sc.nombre}">												
											</h:commandLink>
										</p:dataList>
										
									</p:dataList>
								</h:form>
							</ul>
						</li>
<!-- 						<li><a href="#" class="texto-icono-cliente">
							<span class="glyphicon glyphicon-sort-by-attributes-alt"> </span> Top Pagas
						</a></li> -->
						<li>
							<h:form styleClass="texto-icono-cliente">
								<h:commandLink actionListener="#{versionBean.obtenerContenidosFiltrados('toppagas', loginBean.email)}">
									<span class="glyphicon glyphicon-sort-by-attributes-alt"> </span> Top Pagas
								</h:commandLink>
							</h:form>
						</li>						
						<li>
							<p:outputPanel rendered="#{!loginBean.logueado}" styleClass="texto-icono-cliente">
								<a href="#{request.contextPath}/clienteRegistro.xhtml"><span class="glyphicon glyphicon-edit"></span> Registrarse</a>
							</p:outputPanel>
						</li>
					    <li>
						    <p:outputPanel rendered="#{!loginBean.logueado}" styleClass="texto-icono-cliente">
						    	<a href="#{request.contextPath}/login.xhtml"><span class="glyphicon glyphicon-log-in"></span> Acceder </a>
						    </p:outputPanel>
					    </li>	
						
						<li>
							<h:form rendered="#{loginBean.logueado}" styleClass="texto-icono-cliente">
								<h:commandLink actionListener="#{versionBean.obtenerContenidosFiltrados('wishlist', loginBean.email)}">
									<span class="glyphicon glyphicon-bookmark"> </span> Wishlist
								</h:commandLink>
							</h:form>
						</li>
						
						
						<!-- <li><a href="#" class="" data-toggle="dropdown">Top Pagas</a></li>
						<li><a href="/MarketWEB/market/listarVentasCliente.xhtml">Mis Compras</a></li>
						<li><a href="/MarketWEB/market/clienteRegistro.xhtml"><span class="glyphicon glyphicon-edit"></span> Registrarse </a></li>
					    <li><a href="#{request.contextPath}/login.xhtml"><span class="glyphicon glyphicon-log-in"></span> Acceder </a></li> -->	
					    
						<li>
							<p:outputPanel rendered="#{loginBean.logueado}" styleClass="texto-icono-cliente">
								<a href="/MarketWEB/market/listarVentasCliente.xhtml"><span class="glyphicon glyphicon-shopping-cart"></span> Mis Compras</a>
							</p:outputPanel>
						</li>					    
					</ul>			

				    <!--  Para probar facebook -->
					<!-- <div style="float:right;">
						<iframe width="200" height="60" src="loginFacebook.html" scrolling="no" frameborder="no" ></iframe>
					</div> -->	    	    
	
				    <!-- Con esto aca deshabilita el item al estar en formato chico para tablets o celulares -->
					<!-- <div id="search-header" class="hidden-xs animated bounceInRight"> -->
										
					<h:form id="search-header" class="navbar-form navbar-right" role="search">
						<div class="input-group">
							<!-- <input id="valor" class="form-control" type="text" placeholder="Buscar app ..."/> -->
							<h:inputText value="#{versionBean.buscar}" styleClass="form-control" placeholder="Buscar ..." label="Buscar"  id="buscar"/>
							<p:watermark for="buscar" value="Buscar..." />
							<span class="input-group-btn">
								<!-- <button class="btn btn-default" type="button"> -->
								<p:commandButton actionListener="#{versionBean.obtenerContenidosFiltrados('buscar', '_|_')}"
								styleClass="btn btn-default glyphicon glyphicon-search" style="margin:auto; top:auto;">
									<!-- <i class="fa fa-search"></i> -->
									<!-- <span class="glyphicon glyphicon-search"></span> -->

								</p:commandButton>									
								<!-- </button> -->
							</span>
						</div>
					</h:form>

			  </div><!-- /.navbar-collapse -->
			</div>
			</div>
		
		
		
<!-- ///////////////////////  SECCION DE CARGA DE LAS WEBS ///////////////////////////// -->
		
		
		
			<div class="post">
				<ui:insert name="index"></ui:insert>
				<ui:insert name="adminRegistro"></ui:insert>
				<ui:insert name="adminListar"></ui:insert>
				<ui:insert name="adminModificar"></ui:insert>
				<ui:insert name="categoriaRegistro"></ui:insert>
				<ui:insert name="categoriaListar"></ui:insert>
				<ui:insert name="subcategoriaRegistro"></ui:insert>
				<ui:insert name="subcategoriaListar"></ui:insert>
				<ui:insert name="cdRegistro"></ui:insert>
				<ui:insert name="cdListar"></ui:insert>
				<ui:insert name="versionRegistro"></ui:insert>
				<ui:insert name="versionListar"></ui:insert>
				<ui:insert name="itemsCD"></ui:insert>
				<ui:insert name="clienteRegistro"></ui:insert>
				<ui:insert name="proveedorRegistro"></ui:insert>
				<ui:insert name="listarVentas"></ui:insert>				
				<ui:insert name="gestionReclamo"></ui:insert>
				<ui:insert name="listarReclamosVenta"></ui:insert>				
			</div>



<!-- ///////////////////////  PIE DE PAGINA ///////////////////////////// -->

			
			<div>
				<p:outputPanel rendered="#{!loginBean.logueado}">
				<div id="footer-widgets" class="container" style="width:auto; text-align: center;">

					<div class="col-md-4" style="padding: auto;">
						<div>
							<h5 class="footer-widget-title">Usuarios</h5>
							<ul class="list-unstyled">
								<li>
									<a href="#{request.contextPath}/clienteRegistro.xhtml">
										<span class="glyphicon glyphicon-edit"></span> Registrarse 
									</a>
								</li>							
								<li>
									<a href="#{request.contextPath}/login.xhtml">
										<span class="glyphicon glyphicon-log-in"></span> Acceder 
									</a>
								</li>
								<li>
									<a href="./signin">										
										<i class="fa fa-facebook"></i>acebook										
									</a>
								</li>
								<li>
									<a href="#{request.contextPath}">
										<span class="glyphicon glyphicon-home" style="color:#ffffff;"></span> Home
									</a>
								</li>						
							</ul>
						</div>
					</div>
					
					<div class="col-md-4">
						<div>
							<h4 class="footer-widget-title">Proveedores</h4>
							<ul class="list-unstyled">
								<li>
									<a href="#{request.contextPath}/proveedorRegistro.xhtml">
										<span class="glyphicon glyphicon-edit"></span> Registrarse 
									</a>
								</li>							
								<li>
									<a href="#{request.contextPath}/login.xhtml">
										<span class="glyphicon glyphicon-log-in"></span> Acceder 
									</a>
								</li>
							</ul>
						</div>
					</div>
					
					<div class="col-md-4">
						<div>
							<h4 class="footer-widget-title">Administradores</h4>
							<ul class="list-unstyled">
								<li>
									<a href="#{request.contextPath}/login.xhtml">
										<span class="glyphicon glyphicon-log-in"></span> Acceder 
									</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				</p:outputPanel>

				<p:outputPanel rendered="#{loginBean.logueado}">
				<div id="footer-widgets" class="container" style="width:auto; text-align: center;">
				</div>
				</p:outputPanel>

				
				<div id="footer" class="copyright" style="background-color:#101010; height: auto;">
					<div>
					
						<div style="float: right; text-align: right; vertical-align: baseline;">
							<div><a href="mailto:sabri435@gmail.com?subject=Consultas">  Cortes, Yesica  | <span class="glyphicon glyphicon-envelope"></span></a></div>
							<div><a href="mailto:fedegarcia25@gmail.com?subject=Consultas">  Garcia, Federico | <span class="glyphicon glyphicon-envelope"></span></a></div>
							<div><a href="mailto:fabiw89@gmail.com?subject=Consultas">  Palermo, Fabricio | <span class="glyphicon glyphicon-envelope"></span></a></div>
						</div>				
					
						<div>
							<!-- <img src="../img/logomarket2.png" style="width:30px"></img> -->
							<span>  Universidad de la Republica | Facultad de Ingenieria  </span> 
							<!-- <span class="glyphicon glyphicon-link"></span> -->
						</div>
						
						<div >
							<!-- <img src="../img/logomarket2.png" style="width:30px"></img> --> 
							<span>  Administracion Nacional de Educacion Publica | Consejo de Educacion Tecnico Profesional  </span>
							<!-- <span class="glyphicon glyphicon-link"></span> -->
						</div>
						
						<div> Tecnologo en Informatica | Segundo Semestre | Grupo 1 | 2013</div>					
					</div>
					
				</div>				
			</div>
			
		</h:body>
	</f:view>
</html>
